package cn.xxstudy.blog.service

import cn.xxstudy.blog.dao.UserRepository
import cn.xxstudy.blog.entity.User
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
 * 作者：xinxi on 2020/11/24 23:01
 * 包名：cn.xxstudy.blog.service
 * TODO：一句话描述
 */
@Service
class UserService : IUserService {
    @Autowired
    private lateinit var userRepository: UserRepository
    override fun login(userName: String, password: String): User? {
        return userRepository.findUserByUserNameAndPassword(userName, password)
    }
}